package cn.rayYee.loader 
{
	import flash.display.Loader;
	import flash.events.Event;
	import flash.net.URLRequest;
	import flash.system.LoaderContext;
	/**
	 * Simple Load
	 * @author rayyee
	 */
	public class SimpleLoad extends Loader
	{
		private var _bStartload:Boolean;
		private var _bComplete:Boolean;
		private var _idObj:Object;
		
		public function SimpleLoad() 
		{
			super();
			_bStartload = false;
			_bComplete = false;
		}
		
		/**
		 * super Loader.load()
		 * @param	vUrl
		 * @param	context
		 */
		public function loading (vUrl:Object, id:Object = null, context:LoaderContext = null) : void {
			_idObj = id;
			var request:URLRequest;
			if (vUrl is URLRequest) {
				request = vUrl as URLRequest;
			}else {
				request = new URLRequest(String(vUrl));
			}
			load(request, context);
		}
		
		
		public function get bComplete():Boolean { return _bComplete; }
		
		public function set bComplete(value:Boolean):void 
		{
			_bComplete = value;
		}
		
		public function get bStartload():Boolean { return _bStartload; }
		
		public function set bStartload(value:Boolean):void 
		{
			_bStartload = value;
		}
		
		public function get idObj():Object { return _idObj; }
		
		public function set idObj(value:Object):void 
		{
			_idObj = value;
		}
		
	}

}